cmake_minimum_required(VERSION 3.5)

project(RWLock)

set(CMAKE_CXX_COMPILE "g++")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -O2 -std=c++11 -pthread")

add_library(rwLock
  OBJECT
    rw_lock.cpp
    rw_lock.h
)

add_executable(${PROJECT_NAME} main.cpp)

set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)

target_link_libraries(${PROJECT_NAME} rwLock)